OPTFLAGS	= -O3 -Wall -Werror -Wextra -pedantic -g
CC		= gcc
MAKE		= make
RM		= rm -f
DOXYGEN 	= doxygen

%.o: %.c
	$(CC) $(OPTFLAGS) -o $@ -c $<

all: test-pipe

test-pipe: test-pipe.o mypoc.o
	$(CC) $(OPTFLAGS) test-pipe.o mypoc.o -o test-pipe

popentest: mypoc.o
	$(CC) $(OPTFLAGS) mypoc.o libpopentest.a -o popentest

clean:
	$(RM) *.o *.h.gch test-pipe popentest

fresh: clean all

clean_doc:
	$(RM) -r doc/

doc: clean_doc
	$(DOXYGEN)

clean_all: clean clean_doc

